# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-easyinject
_pkgname=easyinject
__pkgname=EasyInject
pkgver=0.3
pkgrel=9
pkgdesc='A pythonic, reflection driven, dependency injection container.'
url='https://pypi.org/project/EasyInject/#files'
arch=('any')
license=('custom:unknown')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/EasyInject-$pkgver.tar.gz")
sha512sums=('cd5e396b8718628f0f8fc3254f02d45766500cf47b6e0327456f009c971d7875df611e19b7ca60bdcdc49592dc4dd9f9eab171584681f04bbc8e4f790e3d0b31')

build() {
  cd "$__pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$__pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

